package com.yuyou.fn.provider;

import com.yuyou.fn.common.util.Log;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class YyfnServiceProviderApplication {

    private final static Logger log  = LoggerFactory.getLogger(YyfnServiceProviderApplication.class) ;


    public static void main(String[] args) throws InterruptedException {

        log.info("Start service app .....");
        Log.init();
        ClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext("yyfn-service-provider.xml");
        log.info("Success start service app");

        Runtime.getRuntime().addShutdownHook(new Thread(){
            @Override
            public void run() {
                applicationContext.close();
                log.info("Success shutdown service app");
            }
        });



    }
}
